package com.eshop.modules.activity.service.mapper;

import org.apache.ibatis.annotations.Select;
import com.eshop.modules.activity.vo.StoreBargainUserQueryVo;
import java.util.List;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.eshop.modules.activity.domain.StoreBargainUser;
import com.eshop.common.mapper.CoreMapper;

@Repository
public interface StoreBargainUserMapper extends CoreMapper<StoreBargainUser>
{
    @Select({ "SELECT u.uid,u.is_del as isDel,u.bargain_price - u.price as residuePrice,u.id,u.bargain_id as bargainId,u.bargain_price as bargainPrice,u.bargain_price_min as bargainPriceMin,u.price,u.status,b.title,b.image,b.stop_time as datatime FROM store_bargain_user u INNER JOIN store_bargain b ON b.id=u.bargain_id WHERE u.uid = #{uid} AND u.is_del = 0 ORDER BY u.id DESC " })
    List<StoreBargainUserQueryVo> getBargainUserList(@Param("uid") final Long uid, final Page page);
}
